﻿using MyX.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyX.Work
{
    public class XOkStatus : XIMessageStatus
    {
        public XOkStatus(Guid messageID)
        {
            ID = Guid.NewGuid();
            TimeStamp = DateTime.Now;

            Result = "执行完成";
            XMessageID = messageID;
        }

        /// <summary>
        /// ID
        /// </summary>
        public Guid ID { get; set; }

        /// <summary>
        /// 消息ID
        /// </summary>
        public Guid XMessageID { get; set; }

        /// <summary>
        /// 处理完成时间戳
        /// </summary>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// 处理结果描述
        /// </summary>
        public string Result { get; set; }

        /// <summary>
        /// 处理过程发生的异常
        /// </summary>
        public Exception ResultException { get; set; }
    }
}
